package ac.beiwo.baas.object.dao;

import com.mongodb.DB;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.mongodb.MongoDbFactory;
import org.springframework.stereotype.Component;

@Component
public class MongoDao {

    private MongoDbFactory mongo;
    private DB db;

    @Autowired
    public MongoDao(MongoDbFactory mongo) {
        this.mongo = mongo;
        db = mongo.getDb("baas");
    }

    public DB db() {
        return db;
    }


}